package com.itheima.collectionDemo;

import java.util.ArrayList;

public class CollectionDemo6 {
    public static void main(String[] args) {
        ArrayList<String> list = new ArrayList<>();
        list.add("a");
        list.add("b");
        list.add("c");
        list.add("d");

        for (String s : list) {
            s = "q";
            System.out.println(s);
        }
        System.out.println(list);
    }
}
